package gui.win.para;

import core.utils.Utils;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;

/*Author: John Archer, Contact: john.archer.jpa@gmail.com*/
public class Buttons extends JPanel implements ActionListener{
    private JButton close;
    private JFrame ParaL0;
    public Buttons(JFrame ParaL0){
        super(new BorderLayout());
        this.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
        this.ParaL0 = ParaL0;
        this.add(Utils.getButton(close = new JButton("CLOSE"), 382, 22, new Color(102, 102, 102), new Color(178, 178, 178), this, "CLOSE"), BorderLayout.WEST);
        this.setVisible(true);
    }

    public void actionPerformed(ActionEvent evt) {
        Object source = evt.getSource();
        if(source == close){ParaL0.dispose();}
    }
}